package org.easiermock;

import org.easiermock.testmocks.TestDelegate;
import org.easiermock.testmocks.RealInterface;
import org.junit.Assert;

public class EasierMockBasicBehaviourTest extends AbstractEasierMockTest {
	
	@Override
	protected <T extends RealInterface> void testMockBehaviour(T mock, TestDelegate delegate) {
		mock.method1();
		Assert.assertTrue(delegate.wasMethod1Called());
		
		try {
			mock.method2();
			Assert.fail("Expected exception");
		} catch (UnsupportedOperationException e) {
			// Expected exception
		}
	}
	
}
